set scheme s1color

use repeated_cross_section, clear

// muslim indicator 
gen muslim=(paiperc=="06"|paiperc=="08")

// father birthplace FE
egen pbpl=group(paiperc)

// placebo treated cohort indicators and interactions
forval y=1980/1994 {
	gen treatedcoh`y'=(birthyear>=`y')
	gen inter`y'=muslim*treatedcoh`y'
}

estimates clear
forval y=1981/1992 {

	local sample if pnai28=="10" & female==1
	local cl pbpl
	reghdfe secondary inter`y' `sample', absorb(i.pbpl i.birthyear i.ag##i.pbpl i.surveyr) vce(cluster pbpl)
	eststo m`y'
}

esttab m* using "TableB1.csv", star(+ 0.1 * 0.05 ** 0.01 *** 0.001) replace ///
		cells(b(fmt(a3) star) se(par)) stats(N r2)  ///
		keep(inter*) 

		
